<?php

use yii\db\Migration;

/**
 * Handles the creation of table `project_team`.
 */
class m170913_091043_create_project_team_table extends Migration
{
    /**
     * @inheritdoc
     * 项目团队成员表
     */
    public function up()
    {
        $this->createTable('project_team', [
            'id' => $this->bigPrimaryKey(),
            'project_id'=>$this->bigInteger()->notNull()->comment('项目ID'),
            'manager'=>$this->string()->notNull()->comment('项目经理'),
            'owner'=>$this->string()->notNull()->comment('项目负责人'),
            'partner'=>$this->string()->notNull()->comment('项目协助人员'),
            'lock_user' => $this->integer()->comment('上锁用户'),
            'lock_timestamp' => $this->string()->comment('上锁时间'),
        ]);
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $this->dropTable('project_team');
    }
}
